package com.htthorizon.powersupply.controller;

import com.htthorizon.powersupply.service.RdsGridTgCurDfService;
import com.htthorizon.powersupply.service.RdsGridTgPowerDfService;
import com.htthorizon.powersupply.utils.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author Brilliant
 */
@RestController
@RequestMapping("/rdsGridTg/cur")
@Slf4j
public class RdsGridTgCurDfController {

    @Autowired
    private RdsGridTgCurDfService rdsGridTgCurDfService;

    @GetMapping("/getChart")
    public R<Map<String, Object>> getChartPower(@RequestParam("meterId")String meterId) {
        Map<String, Object> map= rdsGridTgCurDfService.getChartCur(meterId);
        //
        return R.ok(map);

    }

}
